#!/bin/sh

# mkbundle ../src/bin/Release/LastFmUriHandler.exe --deps -o lastfmsqueezeboxbridge/usr/bin/lastfmsqueezeboxbridge
cp ../src/bin/Release/LastFmUriHandler.exe lastfmsqueezeboxbridge/usr/lib/lastfmsqueezeboxbridge
md5sum lastfmsqueezeboxbridge/usr/bin/lastfmsqueezeboxbridge > lastfmsqueezeboxbridge/DEBIAN/md5sums
md5sum lastfmsqueezeboxbridge/usr/lib/lastfmsqueezeboxbridge/LastFmUriHandler.exe >> lastfmsqueezeboxbridge/DEBIAN/md5sums

# copy tree
cp -r lastfmsqueezeboxbridge temp

# remove .svn directories
rm -rf `find temp -type d -name .svn`

# build
dpkg-deb --build temp

# cleanup
mv temp.deb lastfmsqueezeboxbridge.deb 
rm -rf temp
